<template>
	<view>
		<uni-table border stripe emptyText="暂无更多数据">
			<uni-tr>
				<uni-th align="center">充值时间</uni-th>
				<uni-th align="center">充值数量(USDT)</uni-th>
				<uni-th align="left">充值状态</uni-th>
				<uni-th align="left">汇率</uni-th>
				<uni-th align="left">实到代币</uni-th>
			</uni-tr>
			<uni-tr v-for="item in tableData" :key="item.id">
				<uni-td>{{item.createtime}}</uni-td>
				<uni-td>{{item.money}}</uni-td>
				<uni-td>
					<text v-if="item.status==1" style="color: green;">已结算</text>
					<text v-if="item.status==0" style="color: orangered;">待审核</text>
					<text v-if="item.status==2" style="color: red;">已拒绝</text>
				</uni-td>
				<uni-td>{{item.huilv??'无'}}</uni-td>
				<uni-td>{{item.sdjine??'无'}}</uni-td>
			</uni-tr>

		</uni-table>
		<view class="uni-pagination-box"><uni-pagination show-icon :page-size="size" :current="page" :total="total"
				@change="change" /></view>
	</view>

</template>

<script setup>
	import {
		onMounted,
		ref
	} from 'vue'
	import {
		rechargeLogAPI
	} from '../../apis/user';
	const tableData = ref([])
	const page = ref(1)
	const size = ref(10)
	const total = ref(0)
	const getList = (async () => {
		const {
			data
		} = await rechargeLogAPI({
			page: page.value,
			size: size.value
		})
		tableData.value = data.czlist
		total.value = data.zongshu
	})

	onMounted(() => {
		getList()
	})
	const change = ((e) => {
		page.value = e.current
		getList({
			page: page.value,
			size: size.value
		})
	})
</script>

<style>

</style>